'use strict' // 严格模式
var fs = require('fs');
var arr = [];
for (var i = 1; i <= 2; i++) {
    var sj = Math.floor(Math.random() * (1000 - 1 + 1) + 1);
    var text = "" + sj + "";
    var file = "./" + i + ".txt"
    fs.writeFileSync(file, text);
    arr.push(Number(text));
}
var max = arr[0];
var maxfile = '';
for (var j = 1; j <= arr.length; j++) {
    if(max < arr[j]){
        max = arr[j];
        maxfile = file;
    }
}
console.log(maxfile);






